a8bb62088bb415f8701c2e0a80979795287ed7c9,spring-boot-sample-web-reactive/src/test/java/sample/web/reactive/ReactiveSampleApplicationTests.java,ReactiveSampleApplicationTests,staticResources,#,71
Before Change
@Test
public void staticResources() throws Exception {
Mono<ResponseEntity<String>> result = this.webClient
.perform(get("http://localhost:{port}/static/spring.txt", this.port).accept(MediaType.TEXT_PLAIN))
.extract(response(String.class));
subscribe(result).awaitAndAssertNextValuesWith(
response -> {
After Change
@Test
public void staticResources() throws Exception {
ClientRequest<Void> request = ClientRequest
.GET("http://localhost:{port}/static/spring.txt", this.port)
.accept(MediaType.TEXT_PLAIN).build();
Mono<String> result = this.webClient
.exchange(request)
.then(response -> response.body(toMono(String.class)));
subscribe(result).awaitAndAssertNextValuesWith(
content -> {